/**
 * 作者: wgx
 * 日期: 2025-03-29 14:48:12
 * 备注: 餐厅升级配置表
 */
package com.motu.monstercity.server.game.commondata.restaurant;

import io.vertx.core.json.JsonObject;

public class RestaurantUpgradeModel {
    protected int id; // id
    protected int restaurantId; // 餐厅的id
    protected int level; // 等级
    protected int skillValue; // 获得的熟练度，升级美食攻略
    protected int scoreValue; // 获得的人气值
    protected long upgradeConsume; // 升级所需消耗的图纸数量
    protected int foodId; // 升级时获得的美食攻略

    public RestaurantUpgradeModel() {
    }

    public RestaurantUpgradeModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        restaurantId = obj.containsKey("restaurant_id") ? obj.getInteger("restaurant_id") : 0;
        level = obj.containsKey("level") ? obj.getInteger("level") : 0;
        skillValue = obj.containsKey("skill_value") ? obj.getInteger("skill_value") : 0;
        scoreValue = obj.containsKey("score_value") ? obj.getInteger("score_value") : 0;
        upgradeConsume = obj.containsKey("upgrade_consume") ? obj.getLong("upgrade_consume") : 0;
        foodId = obj.containsKey("food_id") ? obj.getInteger("food_id") : 0;
    }

    public int getId() {
        return id;
    }

    public int getRestaurantId() {
        return restaurantId;
    }

    public int getLevel() {
        return level;
    }

    public int getSkillValue() {
        return skillValue;
    }

    public int getScoreValue() {
        return scoreValue;
    }

    public long getUpgradeConsume() {
        return upgradeConsume;
    }

    public int getFoodId() {
        return foodId;
    }

}
